home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / reftest / reftest.doc < prev   
Encoding:
Text File  |  1988-06-30  |  7.1 KB  |  162 lines

  1.  
  2.        REFTEST, Version 1.0      6/30/88       by Randy A. Scott
  3.  
  4.  
  5. DESCRIPTION:
  6.     REFTEST will test your machine to determine the best RAM refresh time 
  7.     for your computer and create a short .COM program to set the refresh 
  8.     counter at this rate.  This can result in a performance increase of 5 
  9.     to 25%.
  10.      
  11.  
  12. SYNTAX:
  13.     REFTEST T[filename] | Vn | Mn
  14.  
  15.         T         : Test to find optimum counter value
  16.         Tfilename : Logs results to named file
  17.         Vn        : Tests using specific value n only
  18.         Mn        : Makes QFRESH.COM using value n
  19.     
  20.     "n" is a decimal integer value (1 to 65535), usually between 20 and 
  21.     1024. "filename"'is any legal DOS filename; will overwrite existing 
  22.     files. 
  23.  
  24.  
  25. BACKGROUND:
  26.     Dynamic RAM essentially acts like a tiny capacitor.  Periodically, it 
  27.     has to be "recharged", or refreshed, to retain its contents.  All 
  28.     PC's have a counter that keeps track of when this needs to be done.  
  29.     When the counter counts down to zero, a refresh is triggered.  This 
  30.     counter is adjustable, and is defaults to a more or less arbitrary 
  31.     number. 
  32.  
  33.     During the refresh cycle, the CPU is essentially suspended, so no 
  34.     "work" gets done during a refresh.  This is known as "overhead", and 
  35.     usually eats up somewhere between 5 and 25% of your computer's 
  36.     processing time. 
  37.  
  38.     Most RAM used in computers today doesn't need to be refreshed near as 
  39.     often as the default specifies.  By adjusting the counter value, you 
  40.     can regain much of that lost overhead time. 
  41.  
  42.     The down side is that if you reduce the refresh rate too far, your 
  43.     RAM will lose its charge before a refresh gets done, and some data 
  44.     will be lost.  This will invariably result in a PARITY CHECK error, 
  45.     and you will have to reboot your computer.  This has absolutely no 
  46.     harmful effect on your computer!  It just means that your RAM needs a 
  47.     faster refresh rate. 
  48.  
  49.  
  50. OPERATION:
  51.     Run "REFTEST" alone for a brief description of the program.  Then run 
  52.     "REFTEST Tref.log" to start testing.  (This will create "REF.LOG", 
  53.     which will be a duplicate of what comes up on the screen.)  Every 15 
  54.     to 30 seconds, a line will appear that says, 
  55.     
  56.        Value : nnn    Performance increase : xx%
  57.     
  58.     Higher values represent a longer delay between refresh cycles, and 
  59.     thus greater performance increases.  (The test will actually start 
  60.     with a refresh rate 6 times FASTER than the default, which will give 
  61.     a (probably large) NEGATIVE performance increase). 
  62.  
  63.     Eventually, the percentage performance increase will level out, and 
  64.     will not rise any higher.  At this point, stop the program using 
  65.     Control-C (it won't really stop until it finishes a test cycle).  
  66.     Pick the LOWEST value that corresponds to the highest percentage 
  67.     increase reached.  This will usually be somewhere between 100 and 
  68.     1000.  This is the "n" value you want to use in the next step. 
  69.  
  70.     Now run "REFTEST Mn" where n is the lowest number that resulted in 
  71.     the highest performance increase.  This will create QFRESH.COM 
  72.     optimized for your system, and will report the percentage increase it 
  73.     provides.  You should put QFRESH in your AUTOEXEC.BAT. 
  74.  
  75.  
  76. NOTES:
  77.     If you let "REFTEST T" run long enough, your system will eventually 
  78.     crash with a parity error.  Just cold-reboot.  Take a look at the log 
  79.     file to see where it died.  If it died before the performance 
  80.     increase leveled off, this will show the highest "n" value you can 
  81.     get away with.  If you take exception to your computer locking up 
  82.     with a parity error in the middle of your work, running your machine 
  83.     right on the ragged edge of the refresh cycle is probably not a great 
  84.     idea. 
  85.  
  86.     Note that "n" can be any integer value, not just the ones that show 
  87.     up during testing. 
  88.   
  89.     The default "n" value is 18.  Values higher than this will speed up 
  90.     your machine; values lower will slow it down.   In some instances 
  91.     this may be desirable: if you have a flakey RAM chip somewhere that 
  92.     results in a PARITY CHECK even at the default refresh rate, you can 
  93.     use a small value of "n"--between 1 and 17--and increase the refresh 
  94.     cycle.  This could get you through an important project until you 
  95.     have time to isolate and replace the defective chip. 
  96.  
  97.     For some reason, some computers will crash with a "n" value of 1. 
  98.     
  99.     IMPORTANT NOTE: The parity error is your safety net when playing with 
  100.     refresh cycles.  If you get a PARITY CHECK, you've gone too far; if 
  101.     not, you're OK.  Unfortunately, not all IBM "compatibles" utilize 
  102.     parity.  A few less expensive clones--in particular, Tandy's lower-
  103.     end models, like the 1000's--don't. 
  104.  
  105.     The easiest way to tell if your computer uses parity checking is so 
  106.     see how many RAM chips it takes to add a bank of RAM.  If there are 9 
  107.     chips per bank, you have parity; if there are only 8, you don't. 
  108.  
  109.     If your machine doesn't have parity, you could go past the allowable 
  110.     refresh cycle time and not know it.  Nothing would go wrong until you 
  111.     happened to execute code that happened to reside at a RAM location 
  112.     that needs a faster refresh.  Then you will undoubtably get an abrupt 
  113.     crash. 
  114.  
  115.     If you have one of these machines without parity, your best bet is to 
  116.     thoroughly test the RAM at the new refresh rate you choose.  There 
  117.     are many RAM testing programs available; RAMTEST by Brown Bag 
  118.     Software (look for RTEST203.ARC, 45K) is a good one.  It is available
  119.     on The Drawing Board, 15/2, 505-525-0844; downloadable and file-
  120.     requestable. 
  121.  
  122.  
  123. TECHNICAL INFO:
  124.     Modifying the refresh cycle on a PC is really quite simple.  Here is 
  125.     the assembly source for QFRESH.COM, which is created by REFTEST:
  126.  
  127.         MOV     AL, 74          
  128.         OUT     43, AL          ; Tell timer to accept 2 byte value
  129.         MOV     AL, <ll>        ; <ll> is low order byte
  130.         OUT     41, AL           
  131.         MOV     AL, <hh>        ; <hh> is high order byte
  132.         OUT     41, AL
  133.         INT     20              ; Exit to DOS
  134.  
  135.     
  136.     The motivation for this program comes from the July 1988 issue of PC 
  137.     Magazine, which has an excellent discussion of RAM refresh cycles.  
  138.     See it for further information.
  139.  
  140.  
  141. ----------------------------------------------------------------------------
  142.  
  143.  
  144.     I would be interested in hearing your results with this program, 
  145.     especially if you get a performance improvement to of over 15%.  
  146.     If you would like to let me know how it went, please send a 
  147.     description of your system (type of computer, clock speed, amount of 
  148.     memory, etc.) and a copy of the resulting REFTEST log file to me, or 
  149.     upload it to The Drawing Board.
  150.  
  151.     Send comments/suggestions/complaints to:
  152.     
  153.                 Randy A. Scott
  154.                 Box 3702
  155.                 Las Cruces, NM  88005
  156.  
  157.     Or send Fidonet mail to:
  158.                 Randy Scott
  159.                 Sysop, The Drawing Board
  160.                 Fidonet node number 15/2
  161.     
  162.